from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com/')
driver.maximize_window()

case = driver.find_element(By.XPATH, "//*[@id='kw' and @name='wd']")
print(case.get_attribute('outerHTML'))

driver.quit()
